package com.geek.bucks.swagger;

import org.springframework.context.annotation.Configuration;
import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.service.Contact;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

@Configuration
@EnableSwagger2
public class SwaggerConfig {

    public Docket buildDocket() {
        return new Docket(DocumentationType.SWAGGER_2)
                .apiInfo(new ApiInfoBuilder()
                        .title("Swagger Demo Restful API Docs")
                        .description("Swagger 示例 Restful Api 文档")//文档描述
                        .contact(new Contact("朝雾轻寒", "https://www.zwqh.top/", "zwqh@clover1314.com"))
                        .version("1.0")
                        .build())
                ;
    }
}
